package cn.lizemin.command.version1.entity;

import cn.lizemin.command.version1.entity.device.Bulb;

/**
 * @author lzm
 * @version 1.0
 * @description: 键盘类，我们希望键盘也能够控制灯泡
 * @date 2022/5/16 10:28
 */
public class Keyboard {

    private Command command;

    //    设置指令
    public void setCommand(Command command) {
        this.command = command;
    }

    //按钮触发
    public void keyboardPush() {
        System.out.println("按下键盘...");
        command.exe();
    }

    //按钮触发
    public void keyboardPop() {
        System.out.println("键盘弹起...");
        command.unexe();
    }
}
